import { defineStore } from 'pinia'

export interface SiteConfig {
    site_name: string
    record_number: string
    wx_img: string
    sm: string
    about: string
    logo:string,
    logo2:string,
    logo3:string,

}

export const useSiteConfig = defineStore('siteConfig', {
    state: (): SiteConfig => {
        return {
            site_name: '',
            record_number: '',
            wx_img: '',
            sm: '',
            about: '',
            logo: '',
            logo2: '',
            logo3: ''
        }
    },
    actions: {
        dataFill(state: SiteConfig) {
            this.$state = { ...this.$state, ...state }
        },
    },
    persist: {
        key: 'siteConfig',
    },
})